import React, { Component } from 'react'
import Far from './Far'
import Cat from './components/Cat'
import Mouse from './components/Mouse'

export default class App extends Component {
  render() {
    return (
      <div>
        <h1>老陶抓海静案例</h1>
        {/* <Far
          render={(state) => {
            return <Mouse {...state}></Mouse>
          }}
        ></Far> */}
        <Far>
          {/* 如果把数据写在组件的子节点,子节点的内容也是props数据 */}
          {(state) => {
            return <Mouse {...state}></Mouse>
          }}
        </Far>
        {/* <Far
          render={(state) => {
            return <Cat {...state}></Cat>
          }}
        ></Far> */}
        <Far>
          {(state) => {
            return <Cat {...state}></Cat>
          }}
        </Far>
      </div>
    )
  }
}
